angular.module('app').filter('fiterByObj', [function () {
    return function (list, obj) {
        if(!obj || obj.length < 1)return list;
        var result = [];
        angular.forEach(list, function (item) {
            var isEqual = true;
            for (var key in obj) {
                if ( item[key] != obj[key]) {
                    isEqual = false;
                }
            }
            if(isEqual){
                result.push(item);
            }
        });
        return result;
    };
}]);